#ifndef PSEUDOTHREAD_H
#define PSEUDOTHREAD_H

#include <QObject>
#include <QTimer>

class PseudoThread : public QObject
{
    Q_OBJECT;

public:
    PseudoThread();
    ~PseudoThread();

protected:
    void start();
    void stop();
    void setLoopCount(int count);

private slots:
    void update();

protected:
    virtual bool loopStep() = 0;
private:
    QTimer* timer;
    int loopCount;
};

#endif // PSEUDOTHREAD_H
